Security News
GitHub Removes Malicious Pull Requests Targeting Open Source Repositories
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
error-stack2
Advanced tools
Parse and manipulate error.stack
$ npm i error-stack
const parse = require('error-stack')
const {stack} = new Error('foo')
console.log(stack)
// Error: foo
// at repl:1:11
// at Script.runInThisContext (vm.js:123:20)
const parsed = parse(stack)
parsed.type // Error
parsed.message // foo
parsed.traces
// [
// {
// callee: undefined,
// source: 'repl',
// line: 1,
// col: 11
// },
// {
// callee: 'Script.runInThisContext',
// source: 'vm.js',
// line: 123,
// col: 20
// }
// ]
parsed
.filter(({callee}) => !!callee)
.format()
// Error: foo
// at Script.runInThisContext (vm.js:123:20)
string
Error type
string
The message used by Error constructor
Array<Trace>
interface Source {
// The source of the the callee
source: string
line?: number
col?: number
}
interface Trace extends Source{
callee: string
// Whether the callee is 'eval'
eval?: boolean
// The source location inside eval content
evalTrace: Source
}
Function
the same as the callback function of Array.prototype.filter(callback)
Filters the current traces
Format object parsed
FAQs
Parse and manipulate error.stack
The npm package error-stack2 receives a total of 790 weekly downloads. As such, error-stack2 popularity was classified as not popular.
We found that error-stack2 demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.
Security News
Node.js will be enforcing stricter semver-major PR policies a month before major releases to enhance stability and ensure reliable release candidates.